echo "<-----------开始执行----------->"

echo "<-----------进入文件根目录----------->"
cd `dirname $0`

echo "<-----------当前窗口"`basename $0`"----------->"

echo "<-----------拉取最新代码----------->"
git pull
echo "<-----------添加本地代码----------->"
git add .

read -p "请提交修改备注:" MY_NOTE   #修改备注

echo "<-----------提交暂存----------->"
git commit -m $MY_NOTE .
echo "<-----------push 代码到仓库----------->"
git push -u origin master
echo "<-----------执行gitee page更新脚本----------->"
node update.js
echo "<-----------执行完毕✅----------->"

echo "<-----------5S后关闭窗口----------->"
name=$(basename $0)  #定义窗口名称变量
sleep 5s
osascript -e 'tell application "Terminal" to close (every window whose name contains name )' &